<?php
/**
 * 内容管理视图
 *
 *
 *
 */
// 排序
$arr_orderby    = array(
    'id'        => '&orderby=id',
    'job_name'  => '&orderby=job_name',
    'realname'  => '&orderby=realname',
    'posttime'  => '&orderby=posttime',
    );
$orderby    = strtolower(trim(@$_GET['orderby']));
if(array_key_exists($orderby, $arr_orderby)) {
    $order_asc  = @(int)$_GET['desc'];
    $arr_orderby[$orderby] .= $order_asc == 0 ? '&desc=1' : '&desc=0';
} else {
    $arr_orderby['id'] .= '&desc=0';
}

// 保存数据框架名
$save_frame = $_SESSION[$G_admin_session_key]['save_frame'];
$back_url   = get_current_url();
// 将当前URL保存在Cookie中，避免复杂的URL字符串
cookie('back_url', strcode($back_url));
$url_cur    = get_current_url(array('orderby', 'desc'));


/**
 * 搜索参数处理
 *
 */
// 关键字
$key            = trim(@$_GET['key']);




// + -------------------------------------- + //
// 排序处理 - 为排序加上小图标

$order_by   = @trim($_GET['orderby']);
$order_desc = @(int)$_GET['desc'];

if($order_by != '') {
    $order_desc = ($order_desc!=1) ? 'sort_asc' : 'sort_desc' ;
    $this_param_style  = $order_by . '_style';
    $$this_param_style = '<div class="' . $order_desc . '"></div>';
}

// + -------------------------------------- + //

require($abs_admin_cppath . '/header.php');
?>
<SCRIPT LANGUAGE="JavaScript" SRC="<?php echo $url_global['common']; ?>/js/popcalendar.js"></SCRIPT>





<div class="sp_height_5px"></div>
<div class="datacontainer1">
<form action="<?php echo $mod_url['li'] ?>" name="search" method="get">
<div class="new_line">
<input type="hidden" name="mod" value="<?php echo $mod ?>">
<input type="hidden" name="action" value="<?php echo $action ?>">
<input type="hidden" name="cata" value="<?php echo $cata ?>">



	<div class="spW10 fl"></div>
	




<input type="text" name="key" value="<?php echo $key?>" size="10" class="text">


	<input type="submit" value="按应聘职位查询" class="btn">
	&nbsp;&nbsp;
</div>
</form>
<form action="<?php echo $mod_url['del'] ?>" name="del_article" method="post" target="<?php echo $save_frame?>" onsubmit="return del_select_items(this.name, 'item_id[]');">
<TABLE width="100%" BORDER="0" CELLPADDING="4" CELLSPACING="1" bgcolor="#FFFFFF" class="list_table">
<THEAD>
	<TR class="list_head">
		<TH scope=col width="40%"><a href="<?php echo $url_cur ?><?php echo $arr_orderby['job_name'] ?>"><?php echo $job_name_style;?>应聘职位</a></TH>
        <TH scope=col width="10%"><a href="<?php echo $url_cur ?><?php echo $arr_orderby['realname'] ?>"><?php echo $realname_style;?>应聘人</a></TH>
		<TH scope=col width="30%"><a href="<?php echo $url_cur ?><?php echo $arr_orderby['posttime'] ?>"><?php echo $posttime_style;?>申请时间</a></TH>
		<TH scope=col width="20%">操作</TH></TR></THEAD>
<TBODY>
<?php
if(!empty($record) && sizeof($record) > 0) {
    foreach($record as $k=>$v) {
        $title_full = htmlspecialchars($v['job_name']);
        $title_cut  = zh_substr($title_full, 50);
        $realname_full  = htmlspecialchars($v['realname']);
        $realname_cut   = zh_substr($realname_full, 50);
		$txt_createtime = date('Y-m-d H:i:s',$v['posttime']);
?>
	<TR onmouseover="return chgBg(this, 1);" onmouseout="return chgBg(this, 0);">
		<TD bgcolor="#efefef" title="<?php echo $title_full; ?>"><?php echo $title_cut; ?></TD>
		<TD bgcolor="#efefef" title="<?php echo $realname_full; ?>"><?php echo $realname_cut; ?></TD>
		<TD bgcolor="#efefef" class="time01 textC"><?php echo $txt_createtime; ?></TD>
		<TD align="center" bgcolor="#efefef">
			[<a href="<?php echo $mod_url['appview'] ?>&id=<?php echo $v['id']; ?>">查看</a>] | 
			[<a href="<?php echo $mod_url['appdel'] ?>&item_id=<?php echo $v['id']; ?>"" onclick="return del_this();">删除</a>]		</TD>
	</TR>
<?php
    }
} else {
?>
<TR class="tr0" onmouseover="return chgBg(this, 1);" onmouseout="return chgBg(this, 0);"><TD colspan="5">没有或没有找到合适的记录！</TD></TR>
<?php
}
?>
</TBODY>
</TABLE>
<?php
// 分页
$page_info  = "$record_total 条记录 共 $page_total 页 ";
$page_list  = get_page_nav($page_total);
?>
<div class="page_nav">
	<div class="page_info">
		<?php echo $page_info ?>
	</div>
	<div class="page_list_pre">
		&nbsp;&nbsp;<a href="javascript:void(0);" onclick="chkbox_sel_all('del_article', 'item_id[]');"><B><!--全选--></B></a> <a href="javascript:void(0);" onclick="chkbox_sel_reverse('del_article', 'item_id[]');"><B><!--反选--></B></a>
	</div>
	<div class="page_list">
		<?php echo $page_list?>
	</div>
</div>
<div class="new_line">
<!--<input type="submit" name="del" value="删除" class="button02 fl">-->
<input type="hidden" name="deltype" value="<?php echo $save_flag; ?>">

</div>
</form>
		</div>
</div>

<?php
require($abs_admin_cppath . '/footer.php');
?>